
import {ValidatorImp} from "./validator";
/**
 * Created by Yue on 2017/6/13.
 */
export class NumberValidator implements ValidatorImp{
  /**验证数字*/
  REG_NUMBER = '^[0-9]*$';

  forVerify(content: string): boolean {
    content = content.trim();
    let regExp = new RegExp(this.REG_NUMBER);
    if (!regExp.test(content)){
      return false;
    }
    return true;
  }

}
